package com.biz.primus.ms.geo.trans;

import com.biz.primus.common.utils.CopyUtils;
import com.biz.primus.model.geo.vo.ProvinceListRespVo;
import com.biz.primus.ms.geo.dao.po.Province;

import java.util.function.Function;

/**
 * Province2ProvinceListRespVo
 *
 * @author JKLiues
 * @date 2017年10月28日
 */
public class Province2ProvinceListRespVo implements Function<Province, ProvinceListRespVo> {
    @Override
    public ProvinceListRespVo apply(Province province) {
        ProvinceListRespVo resp = new ProvinceListRespVo();
        if (province != null) {
            CopyUtils.copyProperties(province, resp);
            resp.setId(String.valueOf(province.getId()));
        }
        return resp;
    }
}